<div class="content-section documentation">
    <h1>PrimeFlex</h1>
    <p>PrimeFlex is a CSS utility library featuring various helpers such as a grid system, flexbox, spacing, elevation and more. Although it is not required, it is highly
        recommended to add PrimeFlex as it is likely to need such utilities when developing applications with PrimeNG.</p>

    <h5>Download</h5>
    <p>PrimeFlex is available at <a href="https://www.npmjs.com/package/primeflex">npm</a>, if you have an existing application begin with the installation first.</p>

<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
npm install primeflex --save
</app-code>

    <h5>Import</h5>
    <p>Next step is adding the primeflex.css to your application to include all utilities. If you prefer to pick the utilities, move to next step instead.</p>

    <h6>angular.json</h6>
<app-code lang="typescript" ngNonBindable ngPreserveWhitespaces>
"styles": [
    "src/styles.scss",
    "./node_modules/primeflex/primeflex.css"
],
</app-code>

    <p>PrimeFlex is a lightweight library still if you have an application such as one based on angular-cli
        that is able to import scss then you will be able to pick the utilities you need to make the app bundle even smaller.</p>

    <h6>angular.json</h6>
<app-code lang="typescript" ngNonBindable ngPreserveWhitespaces>
"styles": [
    "src/styles.scss",
    "./node_modules/primeflex/src/_variables.scss",
    "./node_modules/primeflex/src/_grid.scss",
    "./node_modules/primeflex/src/_formlayout.scss",
    "./node_modules/primeflex/src/_display.scss",
    "./node_modules/primeflex/src/_text.scss",
    "./node_modules/primeflex/src/flexbox/_flexbox.scss",
    "./node_modules/primeflex/src/_spacing.scss",
    "./node_modules/primeflex/src/_elevation.scss"
],
</app-code>

    <h5>Variables</h5>
    <div class="doc-tablewrapper">
        <table class="doc-table">
            <thead>
                <tr>
                    <th>Variable</th>
                    <th>Description</th>
                    <th>Default</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>$sm</td>
                    <td>Breakpoint of screens such as phones.</td>
                    <td>576px</td>
                </tr>
                <tr>
                    <td>$md</td>
                    <td>Breakpoint of screens such as tablets.</td>
                    <td>768px</td>
                </tr>
                <tr>
                    <td>$lg</td>
                    <td>Breakpoint of screens such as notebook monitors.</td>
                    <td>992px</td>
                </tr>
                <tr>
                    <td>$xl</td>
                    <td>Breakpoint of smaller screens such as desktop monitors.</td>
                    <td>1200px</td>
                </tr>
                <tr>
                    <td>$gutter</td>
                    <td>Padding of a grid column.</td>
                    <td>.5rem</td>
                </tr>
                <tr>
                    <td>$fieldMargin</td>
                    <td>Spacing of a field. Can be vertical of horizontal depending on form layout.</td>
                    <td>.5rem</td>
                </tr>
                <tr>
                    <td>$fieldLabelMargin</td>
                    <td>Spacing of a field label. Can be vertical of horizontal depending on form layout.</td>
                    <td>.5rem</td>
                </tr>
                <tr>
                    <td>$helperTextMargin</td>
                    <td>Top spacing of a helper text.</td>
                    <td>.5rem</td>
                </tr>
                <tr>
                    <td>$spacer</td>
                    <td>Base value to use in spacing utilities, view spacing documentation for details.</td>
                    <td>.5rem</td>
                </tr>
            </tbody>
        </table>
    </div>

    <p>There are two ways to use these variables, one option is getting the source code of PrimeFlex from github, compile your own primeflex and importing the css file. Other
        alternative is importing your own variables to override the defaults if your application can import scss files. Example below overrides breakpoints;
    </p>

    <p><b>_overrides.scss</b></p>
<app-code lang="css" ngNonBindable ngPreserveWhitespaces>
$sm:640px;
$md:720px;
$lg:960px;
$xl:1080px;
</app-code>

<app-code lang="typescript" ngNonBindable ngPreserveWhitespaces>
"styles": [
    "src/styles.scss",
    "src/_overrides.scss",
    "./node_modules/primeflex/src/_variables.scss",
    "./node_modules/primeflex/src/_grid.scss",
    "./node_modules/primeflex/src/_formlayout.scss",
    "./node_modules/primeflex/src/_display.scss",
    "./node_modules/primeflex/src/_text.scss",
    "./node_modules/primeflex/src/flexbox/_flexbox.scss",
    "./node_modules/primeflex/src/_spacing.scss",
    "./node_modules/primeflex/src/_elevation.scss"
],
</app-code>
</div>